<extend name="Base/base" />
<block name="body">
<div class="row with-padding bg-primary" style="font-size:20px; padding:10px 0px;">
  <div class="col-xs-3 text-center">
    <a href="/agent/index" style="color:#ffffff;"><i class="icon-chevron-left"></i></a> 
  </div>
  <div class="col-xs-6 text-center">
    <strong>代理中心</strong>
  </div>
  <div class="col-xs-3 text-center">
    <a href="/agent/index" style="color:#ffffff;"><i class="icon-user"></i></a> 
  </div>
</div>
<div class="container" style="margin-top:20px;">
  <blockquote>个人信息</blockquote>  
  <table class="table table-border table-bordered table-bg">
    <tr>
      <td>ID</td>
      <td>{$agent_info['id']}</td>
    </tr>
    <tr>
      <td>代理等级</td>
      <td>{$agent_info['lv']}</td>
    </tr>
    <tr>
      <td>姓名</td>
      <td>{$agent_info['username']}</td>
    </tr>
    <tr>
      <td>手机</td>
      <td>{$agent_info['mobile']}</td>
    </tr>
    <tr>
      <td>邮箱</td>
      <td>{$agent_info['email']}</td>
    </tr>
    <tr>
      <td>QQ</td>
      <td>{$agent_info['qq']}</td>
    </tr>
    <tr>
      <td>微信</td>
      <td>{$agent_info['wx']}</td>
    </tr>
  </table>
  <form>
    <div class="form-group">
      <label for="exampleInputAccount1">推广链接</label>
      <input type="text" class="form-control" id="exampleInputAccount1" placeholder="" value="{$agent_url}">
    </div>
  </form>
  <div>推广二维码</div>
  <div id="qrcode" style="display:inline-block; margin-top:10px;"></div>
  <if condition="$agent_info['lv'] == 1">
  <form style="margin-top:20px;">
    <div class="form-group">
      <label for="exampleInputAccount1">下级代理注册</label>
      <input type="text" class="form-control" id="exampleInputAccount1" placeholder="" value="{$c_url}">
    </div>
  </form>
  <div>下级代理注册</div>
  <div id="qrcode2" style="display:inline-block; margin-top:10px;"></div>
</div>
</block>
<block name="js">
<script>
$(function(){
  var qrcode = new QRCode('qrcode', {
    text: "{$agent_url}",
    width: 200,
    height: 200,
    colorDark : '#000000',
    colorLight : '#ffffff',
    correctLevel: 3
  });
  
  var qrcode2 = new QRCode('qrcode2', {
    text: "{$c_url}",
    width: 200,
    height: 200,
    colorDark : '#000000',
    colorLight : '#ffffff',
    correctLevel: 3
  });
})
</script>
</block>
